package cn.genmer.test.security.thread.threadcoreknowledge.createthreads.wrongways;

/**
 * @program: concurrency_practice
 * @description: 匿名内部类实现线程
 * @author: Genmer
 * @create: 2020-10-12 16:29
 **/
public class anonymousInnerClassDemo {
    public static void main(String[] args) {
      new Thread(){
          public void run(){
              System.out.println(Thread.currentThread().getName());
          }
      }.start();

      new Thread(new Runnable() {
          @Override
          public void run() {
              System.out.println(Thread.currentThread().getName());
          }
      }).start();
    }
}
